/*
 * @Author: 康为 18037890117@163.com
 * @Date: 2023-03-27 16:00:35
 * @LastEditors: 康为 18037890117@163.com
 * @LastEditTime: 2023-07-20 13:47:58
 * @FilePath: /umi-max/src/pages/Access/index.tsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import CardGrid from '@/framework/CardGrid';
import _ from 'lodash';

function generateLayout() {
  return _.map(_.range(0, 5), function (item, i) {
    return {
      x: i * 4,
      y: i >= 3 ? 18 : 0,
      w: 4,
      h: 18,
      maxW: 12,
      minW: 4,
      minH: 4,
      i: i.toString(),
    };
  });
}

function generateCards() {
  return _.map(_.range(0, 5), function (item, i) {
    return { cardType: 'Line', title: '折线图' };
  });
}

const AccessPage: React.FC = () => {
  return (
    <div style={{ width: '100%', height: '100%' }}>
      <div className="layout" style={{ height: '100%' }}>
        <CardGrid layouts={{ lg: generateLayout() }} cards={generateCards()} />
      </div>
    </div>
  );
};

export default AccessPage;
